I provide this library for use as is -- to any who want it. I carry a major greavance in regards to the numerous files I have downloaded which hinted at the solution to a problem only to find that what I had just spent 1/2 downloading was a demo -- a partial version -- etc. I wrote these functions to address a need in my applications as well as out curriosity -- they have served me well. This version of CLDOS.LIB was created for use with Clipper 5.0. These functions have been tested on machines ranging from standalone 8086 to networked 386s. I haven't had any problems with them and as of this writting all known bugs have been addressed -- which is of course not to say that there aren't any lurking around -- just none that I know of. Enjoy! Brent Farmer 71621,627 CLDOS Function descriptions ----------------------------------------------------------------------------- FUNCTION: numdir() ARGUMENTS: is the desired path RETURNS: an integer indicating the number of matches. DESCRIPTION: Returns number of subdirectories (excluding .. and .) which match the specified dos search path. EXAMPLE CALL: matches = numdir("\*.*") ----------------------------------------------------------------------------- FUNCTION: isdrive() ARGUMENTS: is an integer which coresponds to the drive to test Drive number 0..25 (0=A:,1=B:,2=C:,etc.) RETURNS: Logical value .T. or .F. DESCRIPTION: This function checks for the existance of a physical, logical, or mapped drive. ----------------------------------------------------------------------------- FUNCTION: getdrive() ARGUMENTS: none. RETURNS: integer indicating the current drive number (0=A:,1=B:,2=C:, ...). DESCRIPTION: This function returns the current drive number. ----------------------------------------------------------------------------- FUNCTION: setdrive() ARGUMENTS: is an integer which coresponds to the drive number to set. Drive number 0..25 (0=A:,1=B:,2=C:,etc.) RETURNS: Logical value .T. or .F. DESCRIPTION: This function sets the active drive. ----------------------------------------------------------------------------- FUNCTION: drives() ARGUMENTS: none. RETURNS: a string of valid drive letters. DESCRIPTION: This function returns a string of all physical, logical, and mapped drives. ----------------------------------------------------------------------------- FUNCTION: tempfile() ARGUMENTS: none. RETURNS: temporary file name. DESCRIPTION: This function creates a uniquely named file in the current directory. ----------------------------------------------------------------------------- FUNCTION: dir_list() ARGUMENTS: Letter indicating the drive to scan. RETURNS: A sorted array of all directory entries on the scanned drive. DESCRIPTION: This function returns a sorted list of all directories on a specified drive. EXAMPLE: array_of_dir = dir_list("C") ----------------------------------------------------------------------------- FUNCTION: dirchange() ARGUMENTS: DOS pathname. RETURNS: Logical value .T. or .F. DESCRIPTION: change the current directory. ----------------------------------------------------------------------------- FUNCTION: dirmake() ARGUMENTS: DOS pathname. RETURNS: Logical value .T. or .F. DESCRIPTION: make a new directory. ----------------------------------------------------------------------------- FUNCTION: dirremove() ARGUMENTS: DOS pathname. RETURNS: Logical value .T. or .F. DESCRIPTION: remove the specified directory. -----------------------------------------------------------------------------